package com.oocl.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class ErrorServlet
 */
public class ErrorServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String errorType = request.getParameter("errorType");
		PrintWriter writer = response.getWriter();
		if("1".equals(errorType)){
			writer.println("uname can not be emtry!");
		}else if("2".equals(errorType)){
			writer.println("salary must  be emtry!");
		}else if("3".equals(errorType)){
			writer.println("can not  read  file!");
		}else if("4".equals(errorType)){
			writer.println("birth can not  be emtry!");
		}
	}

}
